package pl.asoft.nbp.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "NBP_WALUTA")
public class Currency {

    @Id
    @Column(name = "KOD_WALUTY")
    private String shortName;

    @Column(name = "NAZWA_WALUTY")
    private String name;
	
    @Column(name = "PRZELICZNIK")
    private double conversion;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public double getConversion() {
        return conversion;
    }

    public void setConversion(double conversion) {
        this.conversion = conversion;
    }

    @Override
    public String toString() {
        return "Currency{" +
                "shortName='" + shortName + '\'' +
                ", name='" + name + '\'' +
                ", conversion=" + conversion +
                '}';
    }
}
